-----------------------------------------------------------------------
-- File:        Heart_Beat.adb
-- Description: Provides a heartbeat to Controllers.adb
--
-- Requires:    Ada.Real_Time,Controllers
--
--				
-- Author:     Ha Le
-----------------------------------------------------------------------

with Ada.Real_Time, Controllers; use Ada.Real_Time, Controllers;

package body Heart_Beat is --CYCLIC

   --Heartbeat Thread
   task body heart_Thread is
		Next_Time:Time:= Clock;
	begin
		delay 3.0;
		loop
			delay until Next_Time;
			Controllers.Start_Tick;
			Next_Time := Next_Time + beat_Period;
		end loop;
	end heart_Thread;
end Heart_Beat;




